<template>
	<view class="house">
		<life-empty v-if="!list.length" url='/pgk-house/add-house/add-house' icon="../../static/icon/缺省.png"
			tip="您还没有认证房屋，请点击" linkText="添加">
		</life-empty>



		<view v-else class="houseList">
			<house-item></house-item>
			<house-item></house-item>
			<house-item></house-item>
			<life-button icon="../../static/icon/add.png">添加新房屋</life-button>
		</view>
	</view>
</template>

<script>
	import {
		getHouseList
	} from '../../api/house.js'
	export default {
		data() {
			return {
				list: []
			}
		},
		methods: {
			async getHouseList() {
				const res = await getHouseList()
				console.log(res)
				this.list = res.data
			}
		},
		onLoad() {
			this.getHouseList()
		}
	}
</script>

<style lang="scss" scoped>
	.house {
		height: 100%;
		background-color: #FAFAFA;
	}

	.houseList {
		margin: 40rpx;
	}
</style>
